home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 90 / CDMM_90_1.ISO / Cycling Manager 2 / CyclingManager2Demo.exe / Disk1 / data1.cab / Game / DataCM2 / scripts / elements / gauge.cnh < prev    next >
Encoding:
Text File  |  2002-05-10  |  15.5 KB  |  574 lines

  1. // gauge.cnh
  2.  
  3. // Init func Predeclaration
  4. func Gui_Component NewDefaultGaugeCompositeV(i32x _iHeight);
  5. func Gui_Component NewGaugeCompositeV(Menu_Material _pGaugeMaterial, Menu_Material _pSliderMaterial, i32x _iHeight);
  6. func Gui_Component NewDefaultGaugeCompositeH(i32x _iWidth);
  7. func Gui_Component NewGaugeCompositeH(Menu_Material _pGaugeMaterial, Menu_Material _pSliderMaterial, i32x _iWidth);
  8. //func Gui_Component InitGaugeCompositeCommon(Menu_Material _pGaugeMaterial, Menu_Material _pSliderMaterial, i32x _iWidth);
  9.  
  10. func Gui_Component NewGaugeV(Menu_Material _pMaterial, i32x _iWidth, i32x _iHeight);
  11. func Gui_Component NewGaugeH(Menu_Material _pMaterial, i32x _iWidth, i32x _iHeight);
  12. func Gui_Component InitGaugeCommon(Gui_Component _component,Menu_Material _pMaterial, i32x _iWidth, i32x _iHeight);
  13.  
  14. func void GaugeCompositeV_SldChange(Gui_Component _psource, f32x _fValue);
  15. func void GaugeCompositeH_SldChange(Gui_Component _psource, f32x _fValue);
  16. func void GaugeComposite_OnEnable();
  17. func void GaugeComposite_OnDisable();
  18.  
  19. func void GaugeCompositeV_OnGaugeResize(i32x _iSize);
  20. func void GaugeCompositeH_OnGaugeResize(i32x _iSize);
  21. func void Gauge_OnGaugeResizeH(i32x _iWidth, i32x _iHeight);
  22. func void Gauge_OnGaugeResizeV(i32x _iWidth, i32x _iHeight);
  23.  
  24. func void Gauge_SetColor(i32x _iColor);
  25. func void GaugeV_OnGaugeValue(f32x _fValue);
  26. func void GaugeH_OnGaugeValue(f32x _fValue);
  27. func void GaugeComposite_OnGaugeValue(f32x _fValue);
  28.  
  29. func void Gauge_SetParam(f32x _fMinValue, f32x _fMaxValue);
  30. func void GaugeComposite_SetParam(f32x _fMinValue, f32x _fMaxValue, f32x _fIncrement);
  31.  
  32. // Standard buttons
  33. // Data class
  34.  
  35. class Gui_dtGauge
  36. {
  37.     var f32x fValue; // value from fMinValue to fMaxValue
  38.     var f32x fMinValue;
  39.     var f32x fMaxValue;
  40.  
  41.     var f32x fClampValue; // value from 0.0 to 1.0
  42.  
  43.     var i32x iWidth;
  44.     var i32x iHeight;
  45.  
  46.     var Gui_Component gcContainer;
  47.     var Gui_Component gcTop;
  48.     var Gui_Component gcBottom;
  49.     var Gui_Component gcBackground;
  50. };    
  51.  
  52.  
  53. class Gui_dtGaugeComposite
  54. {
  55.     var Gui_Component    gcGauge;
  56.     var Gui_Component    gcSlider;
  57.     var i32x            iHandleSize;
  58. };
  59.  
  60.  
  61. // Message
  62. message GaugeColor(i32x _fColor);
  63. message GaugeValue(f32x _fValue);
  64. message GaugeClampValue(f32x _fValue);
  65.  
  66. message GaugeResize(i32x _iWidth, i32x _iHeight);
  67. message GaugeParam(f32x _fMinValue, f32x _fMaxValue);
  68.  
  69. message GaugeCompositeResize(i32x _iSize);
  70. message GaugeCompositeParam(f32x _fMinValue, f32x _fMaxValue, f32x _fIncrement);
  71.  
  72.  
  73. // -------------------------------------------------------------
  74. // -------------------------------------------------------------
  75.  
  76.  
  77. // Predeclaration
  78.  
  79.  
  80.  
  81. // Message handling interface
  82. interface Gui_iGaugeV
  83. {
  84.  
  85.     GaugeV_OnGaugeValue    GaugeValue;
  86.     Gauge_OnGaugeResizeV GaugeResize;
  87.     Gauge_SetParam        GaugeParam;
  88.     Gauge_SetColor        GaugeColor;
  89.  
  90. }
  91.  
  92. interface Gui_iGaugeH
  93. {
  94.  
  95.     GaugeH_OnGaugeValue    GaugeValue;
  96.     Gauge_OnGaugeResizeH GaugeResize;
  97.     Gauge_SetParam        GaugeParam;
  98.     Gauge_SetColor        GaugeColor;
  99.  
  100. }
  101.  
  102. interface Gui_iGaugeCompositeV {
  103.  
  104.     GaugeCompositeV_SldChange        SldChange;
  105.     GaugeCompositeV_OnGaugeResize    GaugeCompositeResize;
  106.     GaugeComposite_OnGaugeValue        GaugeValue;
  107.     GaugeComposite_SetParam            GaugeCompositeParam;
  108.     GaugeComposite_OnEnable            Enable;
  109.     GaugeComposite_OnDisable        Disable;
  110.  
  111. }
  112.  
  113. interface Gui_iGaugeCompositeH
  114. {
  115.  
  116.     GaugeCompositeH_SldChange        SldChange;
  117.     GaugeCompositeH_OnGaugeResize    GaugeCompositeResize;
  118.     GaugeComposite_OnGaugeValue        GaugeValue;
  119.     GaugeComposite_SetParam            GaugeCompositeParam;
  120.     GaugeComposite_OnEnable            Enable;
  121.     GaugeComposite_OnDisable        Disable;
  122. }
  123.  
  124.  
  125. // functions
  126.  
  127. func Gui_Component NewDefaultGaugeCompositeV(i32x _iHeight)
  128. {
  129.     var Gui_Component    composite;
  130.     
  131.     composite=NewGaugeCompositeV(smTrainingDayGauge, smSlider_V, _iHeight);
  132.  
  133.     return(composite);
  134. }
  135.  
  136. func Gui_Component NewDefaultGaugeCompositeH(i32x _iWidth)
  137. {
  138.     var Gui_Component    composite;
  139.     
  140.     composite=NewGaugeCompositeH(smHGauge, smSlider_H, _iWidth);
  141.  
  142.     return(composite);
  143. }
  144.  
  145.  
  146. /*
  147.  *    Function        : New Gauge Composite Vertical
  148.  *    Parameters        : _pGaugeMaterial    material for the gauge
  149.  *                    : _pSliderMaterial    material for the slider
  150.  *                    : _iHeight            height of the composite gauge
  151.  */
  152. func Gui_Component NewGaugeCompositeV(Menu_Material _pGaugeMaterial, Menu_Material _pSliderMaterial, i32x _iHeight)
  153. {
  154.     var Gui_Component    composite;
  155.     var Gui_dtGaugeComposite    pdtData;
  156.     var i32x w,h;
  157.  
  158.     composite=NewObject(Gui_iGaugeCompositeV);
  159.  
  160.     pdtData=new Gui_dtGaugeComposite;
  161.     SetData(composite, pdtData);
  162.  
  163.     pdtData.gcSlider=NewSliderV(_pSliderMaterial, _iHeight);
  164.     pdtData.iHandleSize=GetAreaHeight(_pSliderMaterial,e_GUI_State_Enabled);
  165.     Clip(pdtData.gcSlider);
  166.  
  167.     // the width of the gauge composite is the same as the width of the handle of the slider
  168.     w=SizeX(pdtData.gcSlider);
  169.     // the gauge is smaller than the slider (because of the size of the handle)
  170.     h=_iHeight-pdtData.iHandleSize;
  171.  
  172.     pdtData.gcGauge=NewGaugeV(_pGaugeMaterial, w, h);
  173.  
  174.     StretchTo(composite, w, _iHeight);
  175.  
  176.     SetComponentNumber(composite, 2);
  177.     MountComponent(composite, pdtData.gcGauge);
  178.     MountComponent(composite, pdtData.gcSlider);
  179.  
  180.     // moves the gauge in the middle of the component
  181.     MoveTo(pdtData.gcGauge, (SizeX(composite)-SizeX(pdtData.gcGauge))/2, (SizeY(composite)-SizeY(pdtData.gcGauge))/2);
  182.  
  183.     return(composite);
  184. }
  185.  
  186. /*
  187.  *    Function        : New Gauge Composite Horizontal
  188.  *    Parameters        : _pGaugeMaterial    material for the gauge
  189.  *                    : _pSliderMaterial    material for the slider
  190.  *                    : _iWidth            width of the composite gauge
  191.  */
  192. func Gui_Component NewGaugeCompositeH(Menu_Material _pGaugeMaterial, Menu_Material _pSliderMaterial, i32x _iWidth)
  193. {
  194.     var Gui_Component    composite;
  195.     var Gui_dtGaugeComposite    pdtData;
  196.     var i32x w,h;
  197.  
  198.     composite=NewObject(Gui_iGaugeCompositeH);
  199.  
  200.     pdtData=new Gui_dtGaugeComposite;
  201.     SetData(composite, pdtData);
  202.  
  203.     pdtData.gcSlider=NewSliderH(_pSliderMaterial, _iWidth);
  204.     pdtData.iHandleSize=GetAreaWidth(_pSliderMaterial,e_GUI_State_Enabled);
  205.     Clip(pdtData.gcSlider);
  206.  
  207.     // the height of the gauge composite is the same as the height of the handle of the slider
  208.     h=SizeY(pdtData.gcSlider);
  209.     // the gauge is smaller than the slider (because of the size of the handle)
  210.     w=_iWidth-pdtData.iHandleSize;
  211.  
  212.     pdtData.gcGauge=NewGaugeH(_pGaugeMaterial, w, h/2);
  213.     //pdtData.gcGauge<<GaugeColor(MakeARGB(255,255,0,0));
  214.  
  215.     StretchTo(composite, _iWidth, h);
  216.  
  217.     SetComponentNumber(composite, 2);
  218.     MountComponent(composite, pdtData.gcGauge);
  219.     MountComponent(composite, pdtData.gcSlider);
  220.  
  221.     // moves the gauge in the middle of the component
  222.     MoveTo(pdtData.gcGauge, (SizeX(composite)-SizeX(pdtData.gcGauge))/2, (SizeY(composite)-SizeY(pdtData.gcGauge))/2);
  223.  
  224.     return(composite);
  225. }
  226.  
  227. /*
  228.  *    Function        : New Gauge Vertical
  229.  *    Parameters        : _pMaterial    material for the gauge
  230.  *                    : _iWidth        width of the gauge
  231.  *                    : _iHeight        height of the gauge
  232.  */
  233. func Gui_Component NewGaugeV(Menu_Material _pMaterial, i32x _iWidth, i32x _iHeight)
  234. {
  235.     var Gui_Component    component;
  236.  
  237.     component=NewObject(Gui_iGaugeV);
  238.     InitGaugeCommon(component, _pMaterial, _iWidth, _iHeight);
  239.  
  240.     return(component);
  241. }
  242.  
  243.  
  244. /*
  245.  *    Function        : New Gauge Horizontal
  246.  *    Parameters        : _pMaterial    material for the gauge
  247.  *                    : _iWidth        width of the gauge
  248.  *                    : _iHeight        height of the gauge
  249.  */
  250. func Gui_Component NewGaugeH(Menu_Material _pMaterial, i32x _iWidth, i32x _iHeight)
  251. {
  252.     var Gui_Component    component;
  253.  
  254.     component=NewObject(Gui_iGaugeH);
  255.     InitGaugeCommon(component, _pMaterial, _iWidth, _iHeight);
  256.  
  257.     return(component);
  258. }
  259.  
  260.  
  261. /*
  262.  *    Function        : Init Gauge Common
  263.  *    Parameters        : _component    the gauge to initialize
  264.  *                    : _pMaterial    material for the gauge
  265.  *                    : _iWidth        width of the gauge
  266.  *                    : _iHeight        height of the gauge
  267.  */
  268. func Gui_Component InitGaugeCommon(Gui_Component _component, Menu_Material _pMaterial, i32x _iWidth, i32x _iHeight)
  269. {
  270.     var Gui_dtGauge        pdtData;
  271.  
  272.     pdtData=new Gui_dtGauge;
  273.     pdtData.fClampValue=1.0;
  274.     pdtData.fMinValue=0.0;
  275.     pdtData.fMaxValue=1.0;
  276.     pdtData.fValue=1.0;
  277.  
  278.     SetData(_component, pdtData);
  279.     SetComponentNumber(_component, 1);
  280.  
  281.     // Create each bitmap for gauge
  282.     // create a background bitmap
  283.     pdtData.gcBackground=NewBitmap(_pMaterial,1);
  284.     SetAlign(pdtData.gcBackground,e_GUI_HAlign_Zoom,e_GUI_VAlign_Zoom);
  285.     MountComponent(_component,pdtData.gcBackground);
  286.  
  287.     // create a top bitmap
  288.     pdtData.gcTop=NewBitmap(_pMaterial,2);
  289.     SetAlign(pdtData.gcTop,e_GUI_HAlign_Zoom,e_GUI_VAlign_Zoom);
  290.     MountComponent(_component,pdtData.gcTop);
  291.  
  292.     // create a bottom bitmap
  293.     pdtData.gcBottom=NewBitmap(_pMaterial,0);
  294.     SetAlign(pdtData.gcBottom,e_GUI_HAlign_Zoom,e_GUI_VAlign_Zoom);
  295.     MountComponent(_component,pdtData.gcBottom);
  296.  
  297.     // creates a bitmap for the gauge
  298.     pdtData.gcContainer = NewBitmap(_pMaterial, 1);
  299.     SetShadingMode(GetSprite(pdtData.gcContainer),DLC_GouraudMode_ModulateDiffuse,DLC_GouraudMode_ModulateDiffuse);
  300.     Clip(pdtData.gcContainer);
  301.     SetAlign(pdtData.gcContainer, e_GUI_HAlign_Zoom, e_GUI_VAlign_Zoom);
  302.  
  303.     MountComponent(_component, pdtData.gcContainer);
  304.  
  305.     // sends the resize message...
  306.     _component<<GaugeResize(_iWidth, _iHeight);
  307. }
  308.  
  309.  
  310. func void GaugeCompositeV_OnGaugeResize(i32x _iSize)
  311. {
  312.     var Gui_Component    pthis;
  313.     var Gui_dtGaugeComposite    pdtData;
  314.     var i32x w,h;
  315.  
  316.     pthis=GetThis();
  317.     pdtData=GetData(pthis);
  318.  
  319.     // the width of the gauge composite is the same as the width of the handle of the slider
  320.     w=SizeX(pdtData.gcSlider);
  321.     // the gauge is smaller than the slider (because of the size of the handle)
  322.     h=_iSize-pdtData.iHandleSize;
  323.  
  324.     pdtData.gcGauge<<GaugeResize(w/2, h);
  325.     pdtData.gcSlider<<SldSize(_iSize);
  326.  
  327.     StretchTo(pthis, w, _iSize);
  328.  
  329.     // moves the gauge in the middle of the component
  330.     MoveTo(pdtData.gcGauge, (SizeX(pthis)-SizeX(pdtData.gcGauge))/2, (SizeY(pthis)-SizeY(pdtData.gcGauge))/2);
  331. }
  332.  
  333. func void GaugeCompositeH_OnGaugeResize(i32x _iSize)
  334. {
  335.     var Gui_Component    pthis;
  336.     var Gui_dtGaugeComposite    pdtData;
  337.     var i32x w,h;
  338.  
  339.     pthis=GetThis();
  340.     pdtData=GetData(pthis);
  341.  
  342.     // the height of the gauge composite is the same as the height of the handle of the slider
  343.     h=SizeY(pdtData.gcSlider);
  344.     // the gauge is smaller than the slider (because of the size of the handle)
  345.     w=_iSize-pdtData.iHandleSize;
  346.  
  347.     pdtData.gcGauge<<GaugeResize(w, h/2);
  348.     pdtData.gcSlider<<SldSize(_iSize);
  349.  
  350.     StretchTo(pthis, _iSize, h);
  351.  
  352.     // moves the gauge in the middle of the component
  353.     MoveTo(pdtData.gcGauge, (SizeX(pthis)-SizeX(pdtData.gcGauge))/2, (SizeY(pthis)-SizeY(pdtData.gcGauge))/2);
  354. }
  355.  
  356.  
  357. /*
  358.  *    Function        : Gauge resize
  359.  *    Message            : "GaugeResize"
  360.  */
  361. func void Gauge_OnGaugeResizeH(i32x _iWidth, i32x _iHeight)
  362. {
  363.     var Gui_Component    pthis;
  364.     var    Gui_dtGauge        pdtData;
  365.  
  366.     pthis=GetThis();
  367.     pdtData=GetData(pthis);
  368.  
  369.     pdtData.iWidth=_iWidth;
  370.     pdtData.iHeight=_iHeight;
  371.  
  372.     // Stretch the composite (the bitmap is resized with the GaugeValue message)
  373.     StretchTo(pthis, pdtData.iWidth, pdtData.iHeight);
  374.  
  375.     // Left border
  376.     StretchTo(pdtData.gcBottom,SizeX(pdtData.gcBottom),_iHeight);
  377.     MoveTo(pdtData.gcBottom,-SizeX(pdtData.gcBottom),0);
  378.  
  379.     // Center part
  380.     StretchTo(pdtData.gcBackground,_iWidth,_iHeight);
  381.  
  382.     // Right border
  383.     StretchTo(pdtData.gcTop,SizeX(pdtData.gcTop),_iHeight);
  384.     MoveTo(pdtData.gcTop,_iWidth,0);
  385.  
  386.     pthis<<GaugeValue(pdtData.fClampValue);
  387. }
  388. func void Gauge_OnGaugeResizeV(i32x _iWidth, i32x _iHeight)
  389. {
  390.     var Gui_Component    pthis;
  391.     var    Gui_dtGauge        pdtData;
  392.  
  393.     pthis=GetThis();
  394.     pdtData=GetData(pthis);
  395.  
  396.     pdtData.iWidth=_iWidth;
  397.     pdtData.iHeight=_iHeight;
  398.  
  399.     // Stretch the composite (the bitmap is resized with the GaugeValue message)
  400.     StretchTo(pthis, pdtData.iWidth, pdtData.iHeight);
  401.  
  402.     // Bottom border
  403.     StretchTo(pdtData.gcBottom,_iWidth,SizeY(pdtData.gcBottom));
  404.     MoveTo(pdtData.gcBottom,0,-SizeY(pdtData.gcBottom));
  405.  
  406.     // Center part
  407.     StretchTo(pdtData.gcBackground,_iWidth,_iHeight);
  408.  
  409.     // Right border
  410.     StretchTo(pdtData.gcTop,_iWidth,SizeY(pdtData.gcTop));
  411.     MoveTo(pdtData.gcTop,0,_iHeight);
  412.  
  413.     pthis<<GaugeValue(pdtData.fClampValue);
  414. }
  415.  
  416.  
  417. /*
  418.  *    Function        : Gauge set value
  419.  *    Remarks            : Test if value is between min and max
  420.  *    Message            : "GaugeValue"
  421.  */
  422. func void GaugeV_OnGaugeValue(f32x _fValue)
  423. {
  424.     var Gui_Component    pthis;
  425.     var    Gui_dtGauge        pdtData;
  426.  
  427.     pthis=GetThis();
  428.     pdtData=GetData(pthis);
  429.  
  430.     if (_fValue>=pdtData.fMinValue && _fValue<=pdtData.fMaxValue)
  431.     {
  432.         pdtData.fValue = _fValue;
  433.         pdtData.fClampValue = (pdtData.fValue-pdtData.fMinValue)/(pdtData.fMaxValue-pdtData.fMinValue);
  434.  
  435.         // moves the bitmap at the bottom of the component and resizes it
  436.         MoveTo(pdtData.gcContainer, 0, pdtData.iHeight - pdtData.fClampValue*pdtData.iHeight);
  437.         StretchTo(pdtData.gcContainer, pdtData.iWidth, pdtData.fClampValue*pdtData.iHeight);
  438.     }
  439. }
  440.  
  441. /*
  442.  *    Function        : Gauge set value
  443.  *    Remarks            : Test if value is between 0.0 and 1.0
  444.  *    Message            : "GaugeValue"
  445.  */
  446. func void GaugeH_OnGaugeValue(f32x _fValue)
  447. {
  448.     var Gui_Component    pthis;
  449.     var    Gui_dtGauge        pdtData;
  450.  
  451.     pthis=GetThis();
  452.     pdtData=GetData(pthis);
  453.  
  454.     if (_fValue>=pdtData.fMinValue && _fValue<=pdtData.fMaxValue)
  455.     {
  456.         pdtData.fValue = _fValue;
  457.         pdtData.fClampValue = (pdtData.fValue-pdtData.fMinValue)/(pdtData.fMaxValue-pdtData.fMinValue);
  458.         
  459.         // resizes the bitmap
  460.         StretchTo(pdtData.gcContainer, pdtData.fClampValue*pdtData.iWidth, pdtData.iHeight);
  461.     }
  462. }
  463.  
  464.  
  465. func void GaugeComposite_OnEnable()
  466. {
  467.     var Gui_Component            pthis;
  468.     var    Gui_dtGaugeComposite    pdtData;
  469.  
  470.     pthis=GetThis();
  471.     pdtData=GetData(pthis);
  472.  
  473.     pdtData.gcSlider<<Show();
  474. }
  475.  
  476. func void GaugeComposite_OnDisable()
  477. {
  478.     var Gui_Component            pthis;
  479.     var    Gui_dtGaugeComposite    pdtData;
  480.  
  481.     pthis=GetThis();
  482.     pdtData=GetData(pthis);
  483.  
  484.  
  485.     pdtData.gcSlider<<Hide();
  486. }
  487.  
  488. /*
  489.  *    Function        : Gauge Composite Sld Change
  490.  *    Message            : "SldChange"
  491.  */
  492. func void GaugeCompositeV_SldChange(Gui_Component _psource, f32x _fValue)
  493. {
  494.     var Gui_Component            pthis,parent;
  495.     var    Gui_dtGaugeComposite    pdtData;
  496.     var    Gui_dtGauge                pdtGauge;
  497.  
  498.     pthis=GetThis();
  499.     pdtData=GetData(pthis);
  500.  
  501.     pdtGauge=GetData(pdtData.gcGauge);
  502.     pdtData.gcGauge<<GaugeValue(pdtGauge.fMaxValue-_fValue+pdtGauge.fMinValue);
  503.  
  504.     parent=GetParent(pthis);
  505.     parent<<SldChange(pthis,pdtGauge.fMaxValue-_fValue+pdtGauge.fMinValue);
  506. }
  507.  
  508. /*
  509.  *    Function        : Gauge Composite Sld Change
  510.  *    Message            : "SldChange"
  511.  */
  512. func void GaugeCompositeH_SldChange(Gui_Component _psource, f32x _fValue)
  513. {
  514.     var Gui_Component            pthis,parent;
  515.     var    Gui_dtGaugeComposite    pdtData;
  516.  
  517.     pthis=GetThis();
  518.     pdtData=GetData(pthis);
  519.  
  520.     pdtData.gcGauge<<GaugeValue(_fValue);
  521.  
  522.     parent=GetParent(pthis);
  523.     parent<<SldChange(pthis,_fValue);
  524. }
  525.  
  526. func void Gauge_SetParam(f32x _fMinValue, f32x _fMaxValue)
  527. {
  528.     var Gui_Component    pthis;
  529.     var    Gui_dtGauge        pdtData;
  530.  
  531.     pthis=GetThis();
  532.     pdtData=GetData(pthis);
  533.  
  534.     pdtData.fMinValue=_fMinValue;
  535.     pdtData.fMaxValue=_fMaxValue;
  536.     pdtData.fValue=_fMinValue+pdtData.fClampValue*(_fMaxValue-_fMinValue);
  537. }
  538.  
  539.  
  540. func void GaugeComposite_SetParam(f32x _fMinValue, f32x _fMaxValue, f32x _fIncrement)
  541. {
  542.     var Gui_Component            pthis;
  543.     var    Gui_dtGaugeComposite    pdtData;
  544.  
  545.     pthis=GetThis();
  546.     pdtData=GetData(pthis);
  547.  
  548.     pdtData.gcGauge<<GaugeParam(_fMinValue, _fMaxValue);
  549.     pdtData.gcSlider<<SldParam( _fMinValue, _fMaxValue, _fIncrement);
  550. }
  551.  
  552. func void GaugeComposite_OnGaugeValue(f32x _fValue)
  553. {
  554.     var Gui_Component            pthis;
  555.     var    Gui_dtGaugeComposite    pdtData;
  556.  
  557.     pthis=GetThis();
  558.     pdtData=GetData(pthis);
  559.  
  560.     pdtData.gcSlider<<QuietSldValue(_fValue);
  561.     pdtData.gcGauge<<GaugeValue(_fValue);
  562. }
  563.  
  564. func void Gauge_SetColor(i32x _iColor)
  565. {
  566.     var Gui_Component    pthis;
  567.     var    Gui_dtGauge        pdtData;
  568.  
  569.     pthis=GetThis();
  570.     pdtData=GetData(pthis);
  571.  
  572.     SetColor(pdtData.gcContainer,_iColor);
  573. }
  574.